Closed
Conversation
Introduce a Vitest-based test suite at test/api-contracts/ that spawns the real Go binary, makes HTTP requests to API endpoints, and validates response shapes via snapshot testing. This enables verifying API parity when migrating the backend from Go to TypeScript. Initial coverage includes 24 tests across 3 endpoint groups: - configurations (GET list, GET single, PUT create, DELETE) - credentials (GET list, POST create, DELETE by GUID, DELETE reset) - deployments (GET list, GET single, POST create, PATCH update, DELETE) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Introduce a BackendClient abstraction so the same 24 contract tests and
snapshots can validate both the Go HTTP backend and the future TypeScript
direct-call backend. Tests now call client.getConfigurations() instead
of apiGet("/api/configurations"), with backend selection via API_BACKEND
env var.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Use "ok" | "created" | "no_content" | "not_found" | "conflict" instead of numeric HTTP codes. Drop contentType from ContractResult entirely — the Go client validates content-type internally. This makes the future TypeScript direct-call client simpler to implement since it won't need to produce HTTP-specific values. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…ehavior Introduces a test harness that validates both the outbound HTTP requests Publisher sends to Connect and the correctly parsed responses. This enables the future TS ConnectClient to be verified against the same contract. Architecture: test code → Publisher binary → mock Connect server (Node.js). The mock captures all incoming requests for assertion. Currently implements TestAuthentication end-to-end (8 tests); CreateDeployment and ContentDetails are stubbed as describe.skip since they aren't triggerable via standalone Publisher API endpoints. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Adds mock routes, fixtures, and skipped test files for every method on the Connect APIClient interface. The mock server now supports non-JSON responses (HTML, raw bytes, 204 no-body) and has routes ordered by specificity. All 65 new tests are describe.skip — ready to un-skip when the TS ConnectClient is implemented. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Introduces a third contract test suite (test/extension-api-contracts/) that validates how the extension's Axios client constructs requests to Publisher's API and parses responses. Uses a mock Publisher server with canned responses and request capture, following the connect-api-contracts pattern. 79 tests across configurations, credentials, and deployments endpoints verify request correctness (method, path, query params, headers, body), response parsing, and response shape stability via snapshots. Also includes expanded connect-api-contracts test coverage for authentication edge cases, content details, validate deployment, and wait-for-task endpoints. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Extends the api-contracts suite with tests for GET /api/entrypoints and POST /api/inspect endpoints. Adds fixture workspaces for jupyter-nb, quarto-doc, rmd-static, and shiny-python content types to enable inspection testing across multiple project types. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This was referenced Mar 3, 2026
Collaborator
Author
|
Splitting into three focused PRs:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Intent
Type of Change
Approach
User Impact
Automated Tests
Directions for Reviewers
Checklist